package com.company.demo.factory_pattern;

public class SimpleFactory {

    public static Operater getProduct(String operater) {
        switch (operater) {
            case "+":
                return new Add();
            case "-":
                return new Sub();
            case "*":
                return new Mul();
            case "/":
                return new Div();
        }
        return null;
    }

}
